package edu.sctu.zhuyingzhi.month201505.day20150517.timer;

/**
 * Created by user13 on 2015/5/17.
 */
public class Timer implements Runnable{

    public void run(){
        try {
            for (int j = 0; j < 10000; j++) {
                System.out.println(j);
                   Thread.sleep(1000);
            }
        }
        catch (Exception e){

        }
}
//    public static void sleep(long millis, int nanos)
//            throws InterruptedException {
//        if (millis < 0) {
//            throw new IllegalArgumentException("timeout value is negative");
//        }
//
//        if (nanos < 0 || nanos > 999999) {
//            throw new IllegalArgumentException(
//                    "nanosecond timeout value out of range");
//        }
//
//        if (nanos >= 500000 || (nanos != 0 && millis == 0)) {
//            millis++;
//        }
//
//        sleep(millis);
//    }
//    public static native void sleep(long millis) throws InterruptedException;

}
